+ 1

Python challenge question

How is the answer of this code 112133? x=(1,2,3) print(*x,sep='1',end='3') I got this question on python challenge but don't get how it's answer is 112133.

4th May 2022, 10:59 AM
Sanjyot21
Sanjyot21 - avatar
3 Answers
+ 6
*x unpack tuple values to 1 2 3 sep ='1' separates each with delimiter '1' end='3' adds '3' at end See same example by sep='*' , end='@' to understand it clearly.. hope it helps.
4th May 2022, 1:04 PM
Jayakrishna šŸ‡®šŸ‡³
4th May 2022, 3:04 PM
Sanjyot21
Sanjyot21 - avatar
+ 1
You're welcome..
4th May 2022, 3:08 PM
Jayakrishna šŸ‡®šŸ‡³