+ 1
I want to write a code in phyton that prints only letters from input but skips two and prints one.
I want my program to do this; input = 2ab4c#fd56gjl output = afj So it should completely ignore any character other than letters and print the letters by skipping 2. Is there a way to do it? Should i use for loop?
11 Respostas
+ 3
1) post your attempt first
2) For loop is neccecary (2 I think)
+ 3
Just try using for-loops first
(Hint: the 3rd parameter in the range() function is the step)
+ 3
Hello, đ
If you need help, you can post the code you're struggling with!
 ⹠SEARCH for similar QUESTIONS or ANSWERS before posting
 ⹠https://www.sololearn.com/post/75089/?ref=app
+ 2
If you show us your attempt first, and admit you are completely stumped, message me and Ill send you a solution
+ 1
I would do it with a foor loop; then a if conditional as : if letter in "1234567890":, etc
0
joao vitor your solution will only work for numbers. What about special characters?
0
actually would be better to use isalpha()
0
There ya gođđŒ
- 1
Well I am already saying that i need help and cant do it by loading my question here, what else do you want me to admit? I dont have an attempt because i dont have enough knowledge to proceed.