Skip to content
← Back to Community
how can i get the lexer to put the string inside one index
Profile icon
btfuss

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 [earned 5 cycles]
View Answer
Voters
Profile icon
InfectedAdi
Profile icon
btfuss
Comments
hotnewtop
Profile icon
Coder100

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
Profile icon
btfuss

@Coder100 Godzilla vs my coding questions

Profile icon
Coder100

lmao
but what actually is yur question @2plus2is4hoi

Profile icon
AloegelhiPlaysR

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!

Profile icon
btfuss

@AloegelhiPlaysR
did you look at the lex() function

Profile icon
btfuss

@AloegelhiPlaysR in assembly.py