Advertisement
SimeonTs

SUPyF2 Lists Basics Lab - 01. Courses

Sep 27th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.60 KB | None | 0 0
  1. """
  2. Lists Basics - Lab
  3. Check your code: https://judge.softuni.bg/Contests/Practice/Index/1724#0
  4.  
  5. SUPyF2 Lists Basics Lab - 01. Courses
  6.  
  7. Problem:
  8. You will receive a single number n. On the next n lines you will receive names of courses.
  9. You have to create a list of them and print it.
  10.  
  11. Example:
  12. Input:
  13. 2
  14. PB Python
  15. BF Python
  16. Output:
  17. ['PB Python', 'PF Python']
  18.  
  19. Input:
  20. 4
  21. Front-End
  22. C# Web
  23. JS Core
  24. Programming Fundamentals
  25. Output:
  26. ['Front-End', 'C# Web', 'JS Core', 'Programming Fundamentals']
  27. """
  28. my_list = []
  29.  
  30. for line in range(int(input())):
  31.     my_list += [input()]
  32.  
  33. print(my_list)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement