mardi 4 juin 2019

How to compare string to string and convert them to number?

Each string has it own value like

abcd = 1 
tref = 2 
yoiu = 3 
pkmn = 4

and input string is like

abcd tref yoiu pkmn

I need to check if input match any one of these, summarize values and print it out.

I can't use: split, lambda, list, map, tuple, for, while

It is just some challenge but it already took me 2 days and I still don't understand how to solve it.

Aucun commentaire:

Enregistrer un commentaire