If a List L= ['Hello', 'World!'] Identify the correct output of the following…
2023
If a List L= ['Hello', 'World!'] Identify the correct output of the following Python command: print(*L)
- A.
Hello World!
- B.
Hello, World!
- C.
'Hello', 'World!'
- D.
'Hello' 'World!'
Attempted by 1659 students.
Show answer & explanation
Correct answer: A
Output: Hello World! Explanation: The * operator unpacks the list elements and print() prints them separated by a space by default. Step 1: *L expands the list into separate arguments: 'Hello' and 'World!'.