Python interview questions on data types

python interview questions

Question 1 what are data types?

Question 2 why string data type is categorised as an immutable data type

Question 3 what are different data types in python?

Question 4 :WAP to print 6 character in the given string, st1 = “Hello World”.

Question 5: WAP to print all the characters from the fourth to end of the string.

Question 6: what are sets?

Question 7: can we add elements in a set?

Question 8: can we alter items already define in a set?

Question 9: How can we convert a string into set?

Question 10: How do we define immutable sets?

Question 11 : What is the difference between list and array?

Question 12: How to print first 3 elements of a given list l1 = [‘a’,’b’,’c’,’d’,’e’]

Question 13: What does a dictionary consist of?

Question 14: How to print all the keys of a dictionary?

Question 15: How to print all the values of a dictionary?

Question 16: What is a tuple?

Question 17: What will be the output if I am having a tuple and I want to assign a value at index 1 of “5”?

Solve Python challenges on Dictionaries

Be the first to comment

Leave a Reply

Your email address will not be published.