Python Questions & Answers
Write Python code to
Ø Generate prime numbers.
Ø Check if a string is a palindrome.
Ø Replace vowels in a string with spaces.
Ø Count word occurrences in a string.
Ø Find consecutive numbers in a list (e.g., "Print the number that appears consecutively 3 times").
Ø How do you use dictionaries in Python to store key-value pairs efficiently?
Ø Write Python code to split a name column into firstname and lastname.
Ø Generate Fibonacci numbers.
Ø Identify duplicates in a list and count their occurrences.
Ø Explain the difference between lists, tuples, and sets in Python.
Ø How do you handle missing or null values in a dataset using Python?
Ø Describe the process of data serialization and deserialization in Python.
Ø How do you read and write data to and from a database using Python?
Ø Explain the concept of list comprehensions and provide an example.
Ø How do you optimize Python code for better performance? Describe the use of context managers in Python.
Ø How do you handle exceptions and errors in Python?
Ø Explain the role of Pandas library in data manipulation.
Ø How do you integrate Python with big data tools like Apache Spark?
No comments:
Post a Comment