Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def dictionary_and_list(*args, li=[], dic={},**keywords):
- if len(args) > 0:
- for arg in args:
- li.append(arg)
- if len(keywords) > 0:
- for keywd in keywords:
- dic[keywd] = keywords[keywd]
- return {'a_list': li, 'a_dictionary': dic}
- dictionary_and_list('Ok, ', 'you ', 'are done, ')
- dictionary_and_list('it is time ', heading=3, back=2)
- dictionary_and_list('to leave this ', 'Python world. ',
- 'Congratulations on all your accomplishments! ', to=1)
- dictionary_and_list('Goodbye!', earth=0)
- def back_to_earth(*args, heading='Is', back='it', to='yet', earth='time?'):
- last_words = 'Ok, your there: ' + str(liftoff.__next__()-2) + '%! '
- for arg in args:
- last_words += arg
- last_words += '\nHeading\n' + str(heading) + '\nback\n' + str(back) + '\nto\n' + str(to) + '\nearth!\n' + str(earth)
- print(last_words)
- back_to_earth(*dictionary_and_list()['a_list'], **dictionary_and_list()['a_dictionary'])
Add Comment
Please, Sign In to add comment