Create ex.txt

This commit is contained in:
Yukti-09 2020-06-12 17:10:51 +05:30 committed by GitHub
parent f389a5788c
commit a7bab58408
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

13
ex.txt vendored Normal file
View File

@ -0,0 +1,13 @@
i = 0
while i<=5:
print(i,end=' ')
i += 1
else:
print(i,end=' ')
OUTPUT:
0 1 2 3 4 5 6
Most langauges do not allow an else statement without an if.
However, python allows the else statement to be executed without the if provided the loop before it has not been terminated by a break statement.