Tips for python beginners  to solve Codeforces Problems.
Difference between en1 and en2, changed 130 character(s)
1. **Map function** — While taking an integer array input in python we can easily take it through the map function and using the code mentioned below we can directly change it into a list.↵
   _var = list(map(int,input().split()))_↵
2. **Max-Min function** — To get the maximum or minimum value from a list.↵
   _val = max(var)_↵
3. **Sort** — For sorting an array[Remember the sort() method doesn't return the sorted list. Rather it sorts the list in place and returns None. Therefore, assigning var.sort() in a variable will make a equal to None]↵
   _var.sort()_↵
   _print(var)_↵
4. **List Comprehension** : You can directly perform loop inside a List.↵
   _lis = [for i in range(10)]_↵
5. **Array Output** : For array output you can use two method. 1. _print((" ").join(map(str,array)))_ or simply _print(*array)_↵
↵
↵
   ↵

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English SpS__79 2026-03-15 16:26:18 1541
en2 English SpS__79 2025-10-30 13:21:24 130
en1 English SpS__79 2025-03-28 17:26:20 774 1.0 (published)