Author: Surendra Anne

Free: Join our Devops whatsApp/Telegram group(s)

Hello to all from Linux Juggernaut team. We are excited to introduce our multiple WhatsApp groups related to IT infrastructure today. Please join in one or more groups which are appropriate for you. The system administration field had moved towards the devops field a couple of years back. Devops field is the one which is changing quickly with the advent of Cloud technologies and large open source deployments across IT. One person can not cope up with so much new stuff happening in Devops field. The intention of these groups are for information consumption such as Sharing knowledge and issues you...

Read More

PFOTD: Python cmp() builtin function examples

This is one of our post in the “Python function of the day” series which explains about python inbuilt functions. Today we will learn about cmp(). cmp() : The method cmp() compares two datatypes. The data types supported are strings, lists, tuples, sets, dicts, etc. If elements are of the same type, perform the compare and return the result. If elements are different types, check to see if they are numbers. If numbers, perform numeric coercion and compare. If we exhaust in comparing elements, the result is a tie, meaning that 0 is returned. cmp() function will do below comparison in one go. object1 < object2, if object1 is less then the result is -1 object1 > object2, if object2 is less, then the result is 1 object1 = object2, , if object1 and object2 are same then the result is 0 Python cmp() Syntax cmp(object1, object2) Note for python3: Python3 do not have cmp() function anymore. Use below code to implement cmp in your code. ((str1 > str2) - (str1 < str2)) Let us see some examples on cmp function Example1: Compare two strings >> str1='abc' >>> str2='xyz' >>> cmp(str1,str2) -1 Example2: Compare two lists >> list1=[23,45,86] >>> list2=[98,23,23] >>> cmp(list1,list2) -1 >>> cmp(list2,list1) 1 Example3: compare two tuples >> T = ('Bill', 'Carlos', 'Warren', 'Amancio', 'Larry', 'Charles') >>> t = ('Red', 'Purple', 'Green', 'Yellow', 'Black', 'Blue') >>> cmp(T,...

Read More

7 Interview questions for Infrastructure operational manager

Below are some of the typical interview questions you will come across when you apply for an infrastructure operational/Devops manager job. We are providing answers as a reference and these no need to be correct in your situation. They will just aid on how you can approach these type of questions. We usually do not provide answers to these type of issues as most of them are behavioral problems. The answers totally depend on your experiences and how you think at that time. What will you do when a client ask you a task to complete urgently? It totally...

Read More

Over 16,000 readers, Get fresh content from “The Linux juggernaut”

Email Subscribe

ABOUT ME..!

My photo
My name is Surendra Kumar Anne. I hail from Vijayawada which is cultural capital of south Indian state of Andhra Pradesh. I am a Linux evangelist who believes in Hard work, A down to earth person, Likes to share knowledge with others, Loves dogs, Likes photography. At present I work at Bank of America as Sr. Analyst Systems and Administration. You can contact me at surendra (@) linuxnix dot com.