Horje
python generate dictionary in loop Code Example
python generate dictionary in loop
n = int(input())
ans = {}
for i in range (1,n+1):
  ans[i] = i * i
print(ans)
python generate dictionary in loop
n = int(input())
ans = {i : i*i for i in range(1,n+1)}
print(ans)




Python

Related
easy frequency analysis python Code Example easy frequency analysis python Code Example
get a column of a csv python Code Example get a column of a csv python Code Example
pyqt button clicked connect Code Example pyqt button clicked connect Code Example
series has no attirubte reshape python Code Example series has no attirubte reshape python Code Example
create Pandas Data Frame in Python Code Example create Pandas Data Frame in Python Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8