See the Security and Bug Fixes Section - Grub EFI Install Updates Fix Sticky


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
int(3) and int('3') is there a difference? (python3.5)
#3
(02-06-2019, 02:26 AM)bitsnpcs link Wrote: Hello teage,
it can be used apostrophes where the integer is to print within a string using the speech marks " "

There is an example hereĀ  https://www.programiz.com/python-program...ilt-in/int


So its a string that can be added, multiplied, divided etc?

example 1 of the url shows,
# integer
print("int(123) is:", int(123))

# float
print("int(123.23) is:", int(123.23))

# string
print("int('123') is:", int('123'))

so then I experiment with this,

>>> int('2')+int('2')
4

>>> int("2")+int("2")
4

>>> int(2)+int(2)
4

forgive me if my questions seem a bit silly, im just trying to wrap my head around it. :o
Reply


Messages In This Thread
Re: int(3) and int('3') is there a difference? (python3.5) - by teage - 02-06-2019, 02:50 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)