Ask coding questions

← Back to all posts
how can i get the lexer to put the string inside one index
2plus2is4hoi (92)

It has multiple tokens but how to i keep all the tokens inside of quotations inside of 1 index in the tokens list
CHECK ASSEMBLY.PY FOR LEX() FUNCTIOn

Answered by Coder100 (16757) [earned 5 cycles]
View Answer
Comments
hotnewtop
Coder100 (16757)

godzilla had a stroke reading this and literally died

how to i keep all the tokens inside of quotations inside of 1 index in the tokens list
2plus2is4hoi (92)

@Coder100 Godzilla vs my coding questions

Coder100 (16757)

lmao
but what actually is yur question @2plus2is4hoi

AloegelhiPlaysR (104)

Use a array! If you had say 3 types of phones, A array would look like this!

phones = ["iPhone", "Android", "Nokia 3000"]

Now if I want to fetch a item I will do phones[1] for iPhone, etc!