On Thu, Oct 26, 2017 at 9:25 PM, <randyli...@gmail.com> 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 print these in the Python interpreter? For instance: > py Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:57:36) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. py3: s1 = "Welcome students" py3: s4 = 3 * s1 py3: print(s4) Welcome studentsWelcome studentsWelcome students -- boB -- https://mail.python.org/mailman/listinfo/python-list