+ 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

22nd Jul 2020, 12:13 PM
Mr. 12
Mr. 12 - avatar
20 Antworten
+ 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.
22nd Jul 2020, 12:19 PM
Akash Sharma
Akash Sharma - avatar
+ 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)
22nd Jul 2020, 1:08 PM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
+ 2
My suggestion : check that the email entered by the user is actually a email or not
22nd Jul 2020, 12:26 PM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
+ 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.
22nd Jul 2020, 12:55 PM
Mr. 12
Mr. 12 - avatar
+ 2
22nd Jul 2020, 1:17 PM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
+ 2
AKSHAY 😅
22nd Jul 2020, 1:20 PM
Mr. 12
Mr. 12 - avatar
+ 2
Try making the code split the Name
23rd Jul 2020, 1:46 PM
Precious
Precious - avatar
+ 2
yes AKSHAY you r right, Precious how can we do that?
23rd Jul 2020, 2:07 PM
Mr. 12
Mr. 12 - avatar
+ 2
type = (cut[1]).split('.') Use this ....
24th Jul 2020, 5:32 AM
Sanjay Kamath
Sanjay Kamath - avatar
+ 2
Sanjay Kamath its is already there bro
24th Jul 2020, 6:17 AM
Mr. 12
Mr. 12 - avatar
+ 1
Your Code is simple and short.What you want more.
22nd Jul 2020, 12:24 PM
Akash Sharma
Akash Sharma - avatar
+ 1
Akash i don't know bro, thats why i am asking.
22nd Jul 2020, 12:26 PM
Mr. 12
Mr. 12 - avatar
+ 1
AKSHAY thank you broh, how about : if ('@' not in mail) : break is it good?
22nd Jul 2020, 12:31 PM
Mr. 12
Mr. 12 - avatar
+ 1
Akash bro, when i typed the above code, it was saying Error : 'break' out side loop what does this means
22nd Jul 2020, 12:35 PM
Mr. 12
Mr. 12 - avatar
+ 1
Mr. 12 Please save the changes that you made on your posted code.So that I can see what's the mistake.
22nd Jul 2020, 12:41 PM
Akash Sharma
Akash Sharma - avatar
+ 1
Akash Got it bro, check the code now, if you enter without '@' it will print 'enter valid email'.
22nd Jul 2020, 12:44 PM
Mr. 12
Mr. 12 - avatar
+ 1
tell me if you got more suggestions.
22nd Jul 2020, 12:46 PM
Mr. 12
Mr. 12 - avatar
+ 1
Precious what you are saying?? Splitting is not possible in email for names as spaces are not allowed in email
23rd Jul 2020, 2:03 PM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar