Q: What is the default value of encoding in encode()?
Solution: The default value of encoding is utf-8.
Q: What will be the output of the following Python code? print("xyyzxyzxzxyy".endswith("xyy"))
Solution: The function returns True if the given string ends with the specified substring.
Q: What will be the output of the following Python code? print("xyyzxyzxzxyy".endswith("xyy", 0, 2))
Solution: The function returns False if the given string does not end with the specified substring.
You Have Score    | /3 |