#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Jun 20 13:59:54 2023 @author: richardson """ a=input("give me an array, please") bubba = eval(a) # eval takes the string and # evaluates it as if it were typed in the code print(bubba) print(type(bubba)) s = 'bropn[vr2273449' print(s.index('4')) # gives the position of # the first entry that is '4' print(s[2:4]) # [2:4] means 2,3 # s[2:4] gives the 3rd through 4th character of s print(bubba[1:2]) # means make a list # out of element index 1 through index 1 print(bubba[1]) # means the index 1 element of bubba print(s[:4]) #means the first four elements as a list. # i.e. index 0,1,2,3 print(s[4:]) # means all elements starting with index 4 # to the end print(s[-3:]) # means the last 3 elements print(s[:-3]) # means everything through the 4th last element tt='bjhlgrebker' ttt='bjfkla@tcu.edu' print(ttt.index('@tcu.edu'))