The post holds my old notes and questions that have been asked during the era of python2.7. This is my interview prep guide.
Table of Contents
- What is python?
- What is the purpose of PYTHONSTARTUP environment variable?
- Is python a case sensitive language?
- What are 5 standard data types in python?
- What is PEP8?
- What is pickling and unpickling?
- How memory is managed in Python?
- What are the tools that help to find bugs or perform static analysis?
- How will you convert a string to an int in python?
- How will you convert a string to a float in python?
- How will you convert a object to a regular string representation in python?
- How will you convert a String to an object in python?
- How will you convert a string to a tuple in python?
- How will you convert a string to a list in python?
- How will you convert a string to a set in python?
- How will you create a dictionary using tuples in python?
- How will you convert a string to a frozen set in python?
- How will you convert an integer to a character in python?
- How will you convert an integer to an unicode character in python?
- How to convert ASCII to int and back?
- How will you convert an integer to hexadecimal string in python?
- How will you convert an integer to octal string in python?
- What is the purpose of ** operator?
- What is the purpose of // operator?
- Difference between is and == in python?
- Python Format Specifiers(python 2):
- Pick a random item from a list or tuple?
- Pick a random item from a range?
- How can you get a random number in python?
- How will you set the starting value in generating random numbers?
- How will you capitalizes first letter of string?
- How will you check in a string that all characters are alphanumeric?
- How will you check in a string that all characters are digits?
- How will you check in a string that all characters are in lowercase?
- How will you check in a string that all characters are in uppercase?
- How will you check in a string that all characters are numerics?
- How will you check in a string that all characters are whitespaces?
- How will you check in a string that it is properly titlecased?
- How will you replaces all occurrences of old substring in string with new string?
- How will you change case for all letters in string?
- How will you check in a string that all characters are decimal?
- What is the output of ['Hi!'] * 4?
- How will you get the max valued item of a list?
- How will you get the min valued item of a list?
- How will you get the index of an object in a list?
- How will you insert an object at given index in a list?
- How will you remove last object from a list?
- How your python code gets executed?
- Is .pyc created every time code is run?
- Different python complied extensions