0
I'm trying to fix a simple code in python
Basically, I'm trying to print out an index(pretty sure that's what it's called). however! I don't want to see the bracket or quotation marks. this is what I've got dog_name = [] print("please type a name for the dog") dog_name.append(str(raw_input(""))) print dog_name I'm not sure how to tweak it from here.... thanks in advance!
2 Antworten
+ 2
Splat (*) see example attached.
https://code.sololearn.com/c4TA37yaJaB2/?ref=app
0
or if you just want to print the specific index.
print(dog_name[0])
would print the first item in your list.
dog_name[0] is where the list starts. dog_name[1] would actually be the second item in your list