Jun-09-2018, 12:51 PM
thanks!
this is why it's confusing and I'd like to understand why the different results before I move on with the course.
this is what I get
this is why it's confusing and I'd like to understand why the different results before I move on with the course.
this is what I get
Python 3.5.3 (default, Jan 19 2017, 14:11:04) [GCC 6.3.0 20170118] on linux Type "help", "copyright", "credits" or "license" for more information. >>> data = 'From [email protected] Sat Jan 5 09:14:16 2008' >>> atpos = data.find('@') >>> print (atpos) 21 >>> spos = data.find(' ',atpos) >>> print (spos) -1 >>> host = data[atpos+1 : spos] >>> print (host) uct.ac.za Sat Jan 5 09:14:16 200 >>>