[CHALLENGE] | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 9

[CHALLENGE]

Create a program that removes any number from a String and outputs the new value example: String sololearn = "Solo537learn"; // output = Sololearn

20th Mar 2018, 7:01 AM
Moses Katsina
Moses Katsina - avatar
13 Respostas
26th Mar 2018, 7:19 PM
MeanMachine
MeanMachine - avatar
+ 21
https://code.sololearn.com/cTWERkbGpWR5/?ref=app
20th Mar 2018, 1:18 PM
LukArToDo
LukArToDo - avatar
25th Mar 2018, 1:29 AM
David Ashton
David Ashton - avatar
+ 12
S="Solo537learn" print (*[i for i in S if not (i.isnumeric())],sep='') https://code.sololearn.com/cotWa27X3hKt/?ref=app
20th Mar 2018, 7:14 AM
Louis
Louis - avatar
+ 10
My solution: ā€¢ One-liner ā€¢ No if statements ā€¢ 40 bytes https://code.sololearn.com/cJGfbCY9FXUC/?ref=app
20th Mar 2018, 9:19 AM
ʒred
ʒred - avatar
+ 9
C++: string s; getline(cin,s); cout<<regex_replace(str,regex("[\\d]+"),"");
20th Mar 2018, 7:41 AM
Kinshuk Vasisht
Kinshuk Vasisht - avatar
20th Mar 2018, 7:32 AM
Sudarshan Rai
Sudarshan Rai - avatar
+ 7
https://code.sololearn.com/cXOpmKdeZKIY/?ref=app
22nd Mar 2018, 1:02 PM
KƤzĆ® MrĆ®dĆ¹l HĆøssƤƮn
KƤzĆ® MrĆ®dĆ¹l HĆøssƤƮn - avatar
20th Mar 2018, 4:16 PM
William Then
William Then - avatar
+ 2
https://code.sololearn.com/cmSggQa6rz87/?ref=app
21st Mar 2018, 1:15 AM
Galen Schick
Galen Schick - avatar
+ 2
SUGGESTION: Also try removing special characters from the imputed string. For example, INPUT: benze-6-#/\ne OUTPUT: benzene
3rd Jun 2018, 8:30 AM
Rahul George
Rahul George - avatar
- 2
bhai zara hindi me sikha do yaar
21st Mar 2018, 7:29 PM
Iliyas Momin
Iliyas Momin - avatar