To convert a number from Python to text and output it

Asked 2 weeks ago, Updated 2 weeks ago, 2 views

I'm a beginner at Python.

1= Computer
2=Cellphone

If you press 1, 'computer' and if you press 2, 'cell phone' will be on the list. How do I make the code?

list [ ]
str(1)= Computer
str(2)=Cellphone
list.append( 1 )

That's all I can think of.

python

2022-09-20 12:33

1 Answers

If you have any answers or tips


© 2022 pinfo. All rights reserved.