Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Enhance Data Structures : Support for in iteration of dict #1881

Open
@faze-geek

Description

@faze-geek
def f():
    d:dict[i32,i32] = {1 : 100,2 : 200,3 : 300,4 : 400}
    i:i32
    for i in d:      # for in works with string, list, tuple, set
        print(i) 
f()

(lp) C:\Users\kunni\lpython>python try.py
1
2
3
4

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions