+ 3
Can Anyone tell more ideas for this code?
The below code is working fine, can anyone tell me more ideas to this code. https://code.sololearn.com/cCOlB1YA50j1/?ref=app
18 Respostas
+ 4
Please Don't write your Code in question It is hard to read and understand in that way.Please click on edit your question and then on plus icon and then Click on Insert Code to insert your Code.Then Everyone can understand your question and can answer you.
+ 3
♤♢☞ 𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 ☜♢♤ as for beginners regex is like 😨 .
So, Mr. 12 try with basics and every day upgrade yourself to next level.
And about the code: (if '@' not in mail) is good and also test for '.' in mail string.
edit: also test for if there is any space in given string except the spaces at ends (which maybe by mistake by user)
+ 2
My suggestion : check that the email entered by the user is actually a email or not
+ 2
♤♢☞ 𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 ☜♢♤ broh, i am just a beginner, i am still learning.
i dont know what is regex, but i will definitely try to know about it.
+ 2
♤♢☞ 𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 ☜♢♤ yes you are right Mr. 12 should add beginner in tags
+ 2
AKSHAY 😅
+ 2
Try making the code split the Name
+ 2
type = (cut[1]).split('.')
Use this ....
+ 2
Sanjay Kamath its is already there bro
+ 1
Your Code is simple and short.What you want more.
+ 1
Akash i don't know bro, thats why i am asking.
+ 1
AKSHAY thank you broh,
how about :
if ('@' not in mail) :
break
is it good?
+ 1
Akash bro, when i typed the above code, it was saying
Error : 'break' out side loop
what does this means
+ 1
Mr. 12 Please save the changes that you made on your posted code.So that I can see what's the mistake.
+ 1
Akash Got it bro,
check the code now,
if you enter without '@' it will print
'enter valid email'.
+ 1
tell me if you got more suggestions.
+ 1
Precious what you are saying?? Splitting is not possible in email for names as spaces are not allowed in email