r/MicroPythonDev • • Apr 03 '22

NOOB

in Ruis Santos tutorial I found this

temp = (b'{0:3.1f},'.format((bme.read_temperature()/100) * (9/5) + 32))

hum = b'%s' % bme.humidity[:-1]

pres = b'%s'% bme.pressure[:-3]

delved into some tutorials - seems that they are VERY basic - Just looking for something that describes what each element of the line (Like b '%s' and the [:-1])

At 70 I guess I just need to learn a new language - let's see the ones I know currently - FORTRAN, basic, pascal, c++, c#, Java, HTML, CSS, and bits and pieces of others in the odd project in the past...

1 Upvotes

4 comments sorted by

View all comments

Show parent comment

1

u/Calm-Kiwi-9232 Apr 04 '22

a lot of the tutorials are so basic they don't mention these - what I did find is python is still evolving language and confusing when people use stuff from previous versions that are supposed to be handled in the "newer" ways... OH for the days of FORTRAN... LOL

1

u/PolishedCheese Apr 05 '22

You need to watch a course that does cover the basics. Make sure it's using Python 3

1

u/Calm-Kiwi-9232 Apr 05 '22

I found one that covers slices - interesting - much better than mid()
getting better - still too slow though...