41.How will you convert a string to a set in python? set(s) − Converts s to a set.
Interview Questions and AnswersPythonTechnical Interview Questions and Answers
41.How will you convert a string to a set in python? set(s) − Converts s to a set.
31.How will you get all the keys from the dictionary? Using dictionary.keys() function, we can get all the keys from the dictionary object. print dict.keys() # Prints all the keys
21.What are tuples in Python? A tuple is another sequence data type that is similar to the list. A tuple consists of a number of values separated by commas. Unlike…
11.What is the output of print str[2:5] if str = ‘Hello World!’? It will print characters starting from 3rd to 5th. Output would be llo.
1.What is Python? Python is a high-level, interpreted, interactive and object-oriented scripting language. Python is designed to be highly readable. It uses English keywords frequently where as other languages use…