How do you remove things that are not letters or numbers
Using the remove function
x="@#213anas45%&+" y='' for i in x: if i.isalpha() or i.isdigit(): y+=i print(y)
Using the functional programming, the filter function accepts two arguments : function : iterable So, in a string X, you can filter your result R as X = "hks12%" R = list(filter(lambda x:x.isalnum(), X)) print(*R)
By using the index of the element. Syntax: del <List_name>[
or del [ : ]
May this will help you.
If you wanna solve your problem in O(n) then run a loop in which each iteration check if a character lands in an alphanumeric category(not underscore)or not, otherwise pop it.
Free month of PRO subscription
Please help me with HTML
Unable to overload +
Please tell me, I used a linear gradient on the blocks, pixels appeared, how can I fix it? Why did this happen?
What is the mistake here?
Struggling to learn
Pls rectify the errors.