Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Else statement
#3
(Mar-08-2021, 03:44 PM)BashBedlam Wrote: You are correct that the problem is with indentation. Everything in between if and else must be indented like this:

if d1 == d2:
    print('Same')
else:
    print ('Different')

Hi Bash,

that's kind of the problem. After the If statement, it won't indent for the Else statement. Am I missing something?
Reply


Messages In This Thread
Else statement - by Lass86 - Mar-08-2021, 03:31 PM
RE: Else statement - by BashBedlam - Mar-08-2021, 03:44 PM
RE: Else statement - by Lass86 - Mar-08-2021, 03:53 PM
RE: Else statement - by buran - Mar-08-2021, 04:00 PM
RE: Else statement - by Lass86 - Mar-09-2021, 08:44 AM
RE: Else statement - by deanhystad - Mar-08-2021, 04:04 PM
RE: Else statement - by Lass86 - Mar-09-2021, 08:45 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020