Make commands into strings | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Make commands into strings

How do i for example use append as a string. i am learning programming while making a note taking program. where i enter in an operator or a method like append and it gives examples tips..etc. here is my code so far attached. Thanks. https://code.sololearn.com/cIm41I6NmGd5/?ref=app

8th Aug 2018, 6:49 PM
Tyler Watson
Tyler Watson - avatar
3 Answers
+ 1
if x == "append": and remove str( from print
8th Aug 2018, 6:55 PM
Markus Kaleton
Markus Kaleton - avatar
+ 1
you could also use a string and not a list. you can use \n inside the string for row change if you need it. so you can only print(append)
9th Aug 2018, 9:14 AM
Markus Kaleton
Markus Kaleton - avatar
8th Aug 2018, 8:14 PM
Tyler Watson
Tyler Watson - avatar