sscasc@tumkur str data type the str represents string data type string is collection of character enclosed in single or double quotes both are valid str="kvnstr is name of string variable str='vedishstr is name of string variable triple double quote or triple single quotes are used to embed string in another string (nested stringstr="""this is 'str data typeexample""print(stroutput is this is 'str data typeexample the [operator used to retrieve specified character from the string the string index starts from hencestr[ indicates the th character in the string str=sscasc tumkurprint(strit display sscasc tumkur print(str[ ]it display list data typea list is collection which is ordered and changeable it allows duplicate members list is similar to array lists are represented by square brackets [and the elements are separated by comma the main difference between list and an array is that list can store different data type elementsbut an array can store only one type of elements list can grow dynamically in memory but the size of array is fixed and they cannot grow dynamically list=[ , ,- "sscasct",'tumkur'print(listit display all elements create list in the list , ,- "sscasct",'tumkurtuple data typea tuple is similar to list tuple contains group of elements which can be different types the elements in the tuple are separated by commas and enclosed in parentheses (the only difference is that tuples are immutable tuples once created cannot be modified the tuple cannot change dynamically that means tuple can be treated as read-only list tpl=( , ,- "sscasct",'tumkur'print(tplit display all elements create tuple in the tuple , ,- "sscasct",'tumkuriv setsset is an unordered collection of unique items and un-indexed the order of elements is not maintained in the sets set does not accept duplicate elements set is defined by values separated by comma inside braces there are two sub types in setsset data type sp_python programming