Write a python program to Extract string till first Non-Alphanumeric character and print it


Topic: Write a python program to Extract string till first Non-Alphanumeric character and print it

Solution

test_str = 'geeks4g!!!eeks'
s=''
for i in test_str:
    
    if i.isalnum()==False:
       break
    else:
      s+=i  
print(s)   



List all Python Programs