Python Theory-Interview Questions

Python-Basic IQString
How will you delete a variable?len()
How will you print Single and Multiple Variables in Python?capitalize()
What is None Data Type?find
What are tokens in Python?Endswith
Why do we not define the type of the variable while declaring it?Encode
What is purpose of type() function?Decode
What are Standard data types?How to define multi-line String literals?
Why Python is Dynamically Typed Language?How to access characters of a String?
What is Elif?Accessing characters by using slice operator:
Program to print the largest of the two numbers.Write a program to traverse a string.
What is Typecasting in Python?Write a program to find the length of the string entered by the user.
Program to check whether a number is even or not.Consider you have to enter a string and displace two characters to the right.How will you do it?
Explain range() functionWrite a program to access each character of string in forward and backward direction by using while loop?
Explain for loop in different ways.Removing spaces from the string:
How will you Create String in python?find():
How will you access character H in Hadoop string?index() method:
How can we use format method?Counting substring in the given String:
How is memory managed in Python?Replacing a string with another string:
What is init?Program to reverse order of words.
String objects are immutable then how we can change the content by using replace() method.
Write a program to print characters at odd position and even position for the given String?
Write a program to reverse the given String
Program to display all positions of substring in a given main string
Write a program to remove duplicate characters from the given input string?