and Answers 100% Pass
How do you find the position of a character in a string?
✔✔By using the `find()` method.
What is the purpose of a while loop?
✔✔To execute a block of code as long as a condition is true.
How do you import a library in Python?
✔✔By using the `import` keyword.
What is the use of the `type()` function in Python?
✔✔It returns the data type of an object.
What does the `not` keyword do in Python?
✔✔It negates a condition.
1
, How do you check the length of a string?
✔✔By using the `len()` function.
What is a Python module?
✔✔A module is a file containing Python code, typically functions and variables, that can be
reused.
How do you convert a list into a tuple?
✔✔By using the `tuple()` function.
What is the purpose of the `id()` function?
✔✔It returns the memory address of an object.
How do you create an empty dictionary?
✔✔By using `{}` or `dict()`.
What is the purpose of the `continue` statement?
✔✔It skips the rest of the current loop iteration and moves to the next one.
2