Ask coding questions

← Back to all posts
How to remove the brackets on the output?
ROCKINGRAYQUAZA

I am using random module i a list and make a sentence but whenever i am running it ,it is showing the word surrounded with brackets but i don't what it like that is there a way??

regrads
RAYQUAZA

Answered by ironblockhd [earned 5 cycles]
View Answer
Voters
ROCKINGRAYQUAZA
Comments
hotnewtop
ironblockhd

Print wild_poke[0] instead of wild_poke

You can mark this reply as correct if it helped

ROCKINGRAYQUAZA

ok let me first check it and why did you put[0]after wild_poke??
@ironblockhd

ROCKINGRAYQUAZA

clear me this and your answer is correct .thanks @ironblockhd

ironblockhd

@ROCKINGRAYQUAZA it has brackets around it because it's a list with one element, you put [0] to put the first pokemon in the list instead of the list itself

ROCKINGRAYQUAZA

thanks @ironblockhd

ROCKINGRAYQUAZA

THANKS EVERYON FOR HELP!!