miscellaneous topics iii sorted first definitionan iterable is an object that allows you to loop through its contents iterables include liststuplesstringsand dictionaries there are number of python methods that work on any iterable the sorted function is built-in function that can be used to sort an iterable as first examplewe can use it to sort list say =[ , , the following sets to [ , , sorted(lthe difference between sorted and sort is that sort(changes the original list lbut sorted(ldoes not the sorted function can be used on other iterables the result is sorted list for instancesorted('xyzab'returns the list [' ',' ',' ',' ',' 'if we really want the result to be stringwe can use the join methods 'join(sorted'xyzab ')this sets to 'abxyzusing sorted on dictionary sorts the keys if-else operator this is convenient operator that can be used to combine an if/else statement into single line here is an examplex ' if == else ' this is equivalent to if == ' elsex' here is another example along with two sample outputsprint'he scored 'scorepoint '' if score> else 'sep''he scored points he scored point continue the continue statement is cousin of the break statement for loops when continue statement is encountered in for loopthe program ignores all the code in the loop beyond the continue