Python Forum
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with slicing string
#1
Can you help me figure out what is the issue in the below code.

My Code:

email = input("What is your email add: ")
#UN = email[:email.index("@")]
print(email)
Error:
>>> ================================ RESTART ================================
>>> 
What is your email add: asdasdasdasdasdasd


Error:
Traceback (most recent call last):   File "C:/Users/ykarkera/Desktop/Python Bible/Strings.py", line 1, in <module>     email = input("What is your email add: ")   File "<string>", line 1, in <module> NameError: name 'asdasdasdasdasdasd' is not defined
>>>
Reply


Messages In This Thread
Problem with slicing string - by YatishK - Apr-24-2017, 09:29 AM
RE: Problem with slicing string - by wavic - Apr-24-2017, 09:39 AM
RE: Problem with slicing string - by YatishK - Apr-24-2017, 09:46 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python3 string slicing Luchano55 4 602 Feb-17-2024, 09:40 AM
Last Post: Pedroski55
  Am I wrong or is Udemy wrong? String Slicing! Mavoz 3 2,537 Nov-05-2022, 11:33 AM
Last Post: Mavoz
  Convert string to float problem vasik006 8 3,392 Jun-03-2022, 06:41 PM
Last Post: deanhystad
  f string concatenation problem growSeb 3 2,248 Jun-28-2021, 05:00 AM
Last Post: buran
Question Problem with string and \n Falassion 6 2,678 Jun-15-2021, 03:59 PM
Last Post: Falassion
  how to deal with problem of converting string to int usthbstar 1 1,967 Jan-05-2021, 01:33 PM
Last Post: perfringo
  string problem Mathisdlg 6 2,842 Aug-05-2020, 09:31 AM
Last Post: Mathisdlg
  String slicing and loop iteration divyansh 9 4,720 Jun-07-2020, 10:29 PM
Last Post: divyansh
  String slicing divyansh 6 3,353 May-31-2020, 06:15 AM
Last Post: pyzyx3qwerty
  sequence slicing problem qliu 4 2,158 Apr-27-2020, 09:50 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020