Thursday , September 19 2024

What is the output of the following piece of code? print(“a”, “b”, “c”, sep=”sep”)

Questions BankCategory: Python Essentials 1What is the output of the following piece of code? print(“a”, “b”, “c”, sep=”sep”)
What is the output of the following piece of code?

print("a", "b", "c", sep="sep")
  • asepbsepcsep
  • asepbsepc
  • a b c
  • abc

Explanation: The print() function prints the strings “a”, “b”, and “c” to the screen, and separates them with the “sep” string. The sep keyword parameter determines the type of separator used between the subsequent print() arguments outputted to the screen.

More Questions: Python Essentials 1 (PE1) Course Final Test