I transfer form JAVA and pretty new in python.I knew python is a convenience language. Then I consider if or not a way I could use in print(''.format()) function to print a list, which I insert couple of word in between value.
I have already tried print(''.format(for i in list)) as simple example showed below:
movies.append(1)
movies.append('The Shawshank Redemption')
movies.append('5 star')
movies.append('whatever')
movies.append('www.google.com')
print('''
The NO.{} Movie is :{}
Rating:{}
Quote:{}
Link:{}
'''.formate(for i in movie)
of course, it shows error invalid syntax at last statement.
movies = [{'title': 'The Shawshank Redemption', 'rating': '5 star', 'quote':'whatever', 'link': 'www.google.com'}]You aren't using .format() correctly. It is for formating a single string with a list of input arguments. You could use it in a loop, but not as a loop..format(*movie))(alsoformatnotformate)