+ 3
Write a function that make letters upper (in a sentence) but delete all things that are not letters like ( space punctuation
python help
11 Réponses
+ 2
i am using a character table and in that range are all upper case letters thats why
+ 2
something like this?
https://code.sololearn.com/cTKy03Jh79c7/?ref=app
+ 2
check is a list of all upper case letters like [A,B,C...] and the code checks if the sample elements match the check elements if not they will not be printed
and ii == i
ii = element in check
i = element in sample
+ 1
but will the space deleted ?
like HELLOWORLD
not HELLO WORLD
+ 1
every thing that is not a upper case letter wont be addet to result
play with the sample text
+ 1
but i didnot understand the use of "check ??
also what ii=i means ?
thanks🍀
+ 1
and why exactly this range(65,91)
+ 1
oh ok . thanks alot
+ 1
no probs :)
0
I would probably do it like this:
print(''.join(x.upper() for x in 'fde_g6 - dh.' if x.isalnum()))