Subscribe * indicates required Email Address * BREAK STATEMENT Break statement ka use top level loop se bahar aane ke liye hota hai, top level loop se bahar aana mtlb us loop ka execution rook dena , even if apki condition true bhi hai fir bhi agar break statement laga hai to apko us loop se bahar aana padega. Aayiye ise example ki madad se aur clear banate hai....... Examples: ------------------------------------------------------------------------------- fruits = ["apple", "banana", "cherry"] for x in fruits: print(x) if x == "banana": break Output: apple banana # basically hm yaha fruit naam ki ek list ke element print kara rhe hai, lekin hmne yaha condition di hai ki jaise hi hm banana pahuchenge to loop ko break kr dena hai, aur loop ke...
Learn Python in very simple language ("keep it super simple")