how do i define something | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

how do i define something

jeff[2,4,5,3,5,5,6] james = jeff[4] if james == 5: print('the one') else: print('jeffs home') it says jeff is not defined in the first line

4th Mar 2024, 10:11 PM
alex
2 Answers
+ 12
Debug: jeff = [2,4,5,3,5,5,6] Replace the "help" tag with the "python" tag.
4th Mar 2024, 10:25 PM
Solo
Solo - avatar
+ 2
To define something in python you simply assign it a value with the assignment opperrator (=).
5th Mar 2024, 7:42 PM
Chris Coder
Chris Coder - avatar