0
Help with trainer code
I don't understand, I made my code on the computer and the results are as expected, but in the trainer code of Sololearn the first letter not take and the 'z' = 'a' shows it as 'b'. It doesn't make spaces for me either and everything is fine on my computer. Any ideas? https://code.sololearn.com/cdQdeZNO637i/?ref=app
5 ответов
0
Have you tried using a dictionary instead of lists to map the letters?
0
No, I have only used lists. I have to try with dictionary, but my real question is why it doesn't work like it does on my computer?
0
If you print the length of your variable 'a', you'll see its only 26 characters. Meaning the list is leaving out your empty string(the space) so it doesnt register. Still trying to see why whats causing 'b' to be printed in for 'z'. Research dictionaries and come back. This challenge will seem like a joke
0
https://code.sololearn.com/czmeRqqsWFvS/?ref=app
Run this and look at the dictonary that gets printed. THATS why 'z' gets 'b' and why your spaces dont show...because spaces turn into 'a's!
0
I have the solution, is the ' , ' how separator.