Jan 30, 2023
- What is the output of the following code?
x = “hello world”
print(x.split())
a. [‘hello’, ‘world’]
b. [‘hello world’]
c. [‘h’, ‘e’, ‘l’, ‘l’, ‘o’, ‘ ‘, ‘w’, ‘o’, ‘r’, ‘l’, ‘d’]
d. None of the above
x = “hello world”
print(x.split())
a. [‘hello’, ‘world’]
b. [‘hello world’]
c. [‘h’, ‘e’, ‘l’, ‘l’, ‘o’, ‘ ‘, ‘w’, ‘o’, ‘r’, ‘l’, ‘d’]
d. None of the above
Learn python tips and tricks with code I Share your knowledge with us to help society. Python Quiz: https://www.clcoding.com/p/quiz-questions.html