Re: Python noob having a little trouble with strings

2017-10-28 Thread William Ray Wing
OSX has been shipping with Python 2.7 for several years. I’m not sure why you are seeing 2.6. Bill > On Oct 27, 2017, at 2:48 AM, Lutz Horn wrote: > > On Thu, Oct 26, 2017 at 07:59:10PM -0700, randyli...@gmail.com wrote: >> Hi Bob, thanks for responding. I'm not sure

Re: Python noob having a little trouble with strings

2017-10-28 Thread Lutz Horn
On Thu, Oct 26, 2017 at 07:59:10PM -0700, randyli...@gmail.com wrote: > Hi Bob, thanks for responding. I'm not sure where to do so, my > professor had us download Pycharm for mac's which uses python 2.6 The code from your question is not specific to Python 2 or 3. Just try it in the Python

Re: Python noob having a little trouble with strings

2017-10-28 Thread Naman Bhalla
I guess your professor just asked you to download Pycharm. It is just MacOS that happens to have Python 2.6 inbuilt. Had your professor actually wanted you to be using Python 2 (I doubt), that would have been 2.7. Regardless of that I recommend having latest Python 2 or 3 as per your

Re: Python noob having a little trouble with strings

2017-10-27 Thread Chris Angelico
On Sat, Oct 28, 2017 at 1:14 AM, Christopher Reimer wrote: > On Oct 27, 2017, at 1:49 AM, Peter J. Holzer wrote: >> >> BTW, I find it hard to believe that PyCharm for the Mac "comes with" >> Python 2.6. Python 2.6 is quite old. The Linux version

Re: Python noob having a little trouble with strings

2017-10-27 Thread Christopher Reimer
On Oct 27, 2017, at 1:49 AM, Peter J. Holzer wrote: > > BTW, I find it hard to believe that PyCharm for the Mac "comes with" > Python 2.6. Python 2.6 is quite old. The Linux version isn't bundled > with a python interpreter and just uses whatever is already installed on > the

Re: Python noob having a little trouble with strings

2017-10-27 Thread Peter J. Holzer
On 2017-10-27 02:59, randyli...@gmail.com wrote: > On Thursday, October 26, 2017 at 7:41:10 PM UTC-7, boB Stepp wrote: >> On Thu, Oct 26, 2017 at 9:25 PM, wrote: [...] >> Why not find out for yourself and print these in the Python >> interpreter? For

Re: Python noob having a little trouble with strings

2017-10-26 Thread randyliu17
On Thursday, October 26, 2017 at 7:41:10 PM UTC-7, boB Stepp wrote: > On Thu, Oct 26, 2017 at 9:25 PM, wrote: > > If s1 = "Welcome students", what is the output when you print the following: > > > > 1. s4 = 3 * s1 > > > > 2. s1[3 : 6] > > > > 3. 'W' in s1 > > > > 4. S1[-1]

Re: Python noob having a little trouble with strings

2017-10-26 Thread boB Stepp
On Thu, Oct 26, 2017 at 9:25 PM, wrote: > If s1 = "Welcome students", what is the output when you print the following: > > 1. s4 = 3 * s1 > > 2. s1[3 : 6] > > 3. 'W' in s1 > > 4. S1[-1] > > 5. S1[:-1] > > Any help would be great, thanks! Why not find out for yourself and

Python noob having a little trouble with strings

2017-10-26 Thread randyliu17
If s1 = "Welcome students", what is the output when you print the following: 1. s4 = 3 * s1 2. s1[3 : 6] 3. 'W' in s1 4. S1[-1] 5. S1[:-1] Any help would be great, thanks! -- https://mail.python.org/mailman/listinfo/python-list