Hi There. Just a comment. Regarding printing format strings, I gonna say this is better and easier: { print(f"Today is: {today}") }
@PythonSimplified2 жыл бұрын
Thank you so much for your tip Aziz! 😀
@azizmiya2 жыл бұрын
@@PythonSimplified It's a pleasure. Your vids always are crystal clear
@Sinke_1002 жыл бұрын
I think it's more common like that
@michalbotor2 жыл бұрын
disagree. f-strings shine when one passes word-like variables such that the f-strings reads like a proper sentence. things start to go south very quickly however once one starts to pass function calls. this is precisely when `.format` method starts to shine. so you see, neither one of them is better than the other, they complement each other. allow me to demonstrate: ``` from datetime import date def verify(f): def g(wd: int) -> str: assert 0 str: return { 0: 'Monday', 1: 'Tuesday', 2: 'Wednesday', 3: 'Thursday', 4: 'Friday', 5: 'Saturday', 6: 'Sunday', }[wd] @verify def daycat(wd: int) -> str: return 'weekday' if wd < 5 else 'weekend' @verify def action(wd: int) -> str: return 'time to go to work' if wd < 5 else 'time to chill' wd = date.today().weekday() print(f'Today is {weekday(wd)}, {daycat(wd)}. {action(wd).capitalize()}!') print('Today is {weekday}, {daycat}. {action}!'.format( weekday = weekday(wd), daycat = daycat(wd), action = action(wd).capitalize(), )) ``` and yes, you could extract all these function calls outside, but you would not only have to come up with new names for the variables, but you would also unnecessarily pollute your namespace, assuming you would only need these function call one time.
@azizmiya2 жыл бұрын
@@michalbotor Thanks Michal
@abdulbasitminhas11492 жыл бұрын
yes, we can do! from datetime import datetime user = user.datetime() start = user.strftime("%m/%d/%Y/%A, %H:%M:%S:%p") print("Date & Time:",start) your tutorial is easy to understandable :) and thanks for this.
@mchess71572 жыл бұрын
I used datetime module several times in my python projects but always looking for solutions to specific situations and I've never tried to arrange my knowledge. Thanks a lot for this video. It is really helpful. I discovered your channel few weeks ago and it will surely be one of my favourites
@AcademiaCS1 Жыл бұрын
It's difficult to understand how being almost 3 am you look so plenty of energy and shining (every square centimeter of your face) You are awesome Mariya Sha!! I can't find anything for complain. UR Simply a perfect teacher, trainner and KZbinr. You find the way to build the bridge between learners and the new knowledge.
@chalmerditmars7037 Жыл бұрын
Thank you so much!!! I have been struggling with writing the middle of a program for 2 months. After following the steps in your video and struggling with line 50 to discover my system had to have string properties assigned to add timezone offset I went to my program assigned my date object as a string and my program worked. So simple but so much grief. Would have never found it without your video!!!
@lad75342 жыл бұрын
I don't know if I haven't looked for more channels but I think this is the first blog about python done in a more fluid way. Thanks for giving us this, I really need to practice
@PythonSimplified2 жыл бұрын
Thank you so much for your lovely comment Luis! 😀 Supper happy to help! 😊
@serenadenphoto2 жыл бұрын
I have struggled with Python's date and time methods. This video was really helpful for me. Thanks!
@PythonSimplified2 жыл бұрын
Thank you so much for the lovely comment, Lars! 😀 Super happy I could help! 😊
@donesy1252 жыл бұрын
Funny I was watching this (almost) on your birthday! Happy birthday!
@PythonSimplified2 жыл бұрын
Thank you so much Christopher!! 😀😀😀
@chalmerditmars7037 Жыл бұрын
Wow, I followed you great up until Your line #50, I got errors there googled and googled and could find no help for my error. I thought my version of python was different than yours, I added a date and used datetime and it worked great. Tried a lot of other things too, finally entered it as: "my_time=time.fromisoformat(str("15:33:08-07:00"))' and wham it worked!!! My system with time must have read the "-" and stored something as an integer, Just had to tell the program that this is a string. You have wonderful energy and do an excellent job of converting high tech into common English, a rare gift. Thank You so much!!!!
@CurrentElectrical2 жыл бұрын
Quite the tribute @5:49! That caught my attention as everyones favourite electrician. 😎
@PythonSimplified2 жыл бұрын
I knew you will appreciate it!! 😀
@watheusbr2 жыл бұрын
Thanks for the video! datetime objects was being a challenge for me. I wasted at least 30 minutes looking for ways to convert my dataframe's date column which were integers.
@PythonSimplified2 жыл бұрын
Hi Matheus 😃 If you're working with Pandas, there's a special conversion method which you might find useful, try: my_df["date"] = pd.to_datetime(my_df["date"]) It might be a quicker 😉 And thank you so much for your lovely comment! 😊
@balazsberes31762 жыл бұрын
Excellent video as always, full of useful information! Thanks! תודה! 😀
@PythonSimplified2 жыл бұрын
Thank you so much Balazs! Super happy you liked it! 😁 בכיף!
@Wyatt-Barton Жыл бұрын
Bingo! I just spent so much time trying to figure this out and your video cleared it up really quickly. Thanks
@lukajeliciclux30742 жыл бұрын
Great video. Speaking of interesting dates your birthday this year is on quite interesting day.
@PythonSimplified2 жыл бұрын
hahahaha I agree! plus being a Gemini whos' born on the 22nd is always a bonus! 😁
@igka40292 жыл бұрын
Спасибо. Очень хорошая подача. Нет "воды". Классно.
@PythonSimplified2 жыл бұрын
Спасибо большое! рада что вам понравилось! 😀😀
@cerealport27262 жыл бұрын
I started learning Python because it is a readily available tool to interact with date/time based data. Going from zero knowledge of programming, to trying to deal with "milliseconds since 1 Jan 1900" date/time, and associated data was challenging, but satisfying to solve. I wish this video had been around a couple of years ago, but I still learned a few cool things from it too. Mariya, can you please send this back in time? ("import time_machine as tm" doesn't work in my version of Python)
@PythonSimplified2 жыл бұрын
I would try a different import statement: "from quantum_realm import time_travel, x_particles, lucky_underware" 🤣🤣🤣 hahahahaha I'm super glad you liked the video! and you're right - I should have filmed it a while back, it's quite a basic topic but also easy to miss! 😉 I find that many folks are using strings instead of date objects without even suspecting there's a special data type for them!
@cerealport27262 жыл бұрын
@@PythonSimplified If i succeed in getting quantum_realm imported, I'll be sure to post some new comments 6 months ago.
@PythonSimplified2 жыл бұрын
@@cerealport2726 🤣🤣🤣🤣🤣
@PythonSimplified2 жыл бұрын
(please include the winning lottery numbers when you do so! 🤣🤣🤣)
@slonbeskonechen83102 жыл бұрын
Your tutorials very clear and understandable! Thank you!
@PythonSimplified2 жыл бұрын
Thank you so much Slon! Glad you like them! 😊
@fabiano92772 жыл бұрын
Dear Mariya, thanks for all your videos. They are awesome! Keep up the good work. 🥳😊
@freezoulou2 жыл бұрын
this is what i need thank you ....i have hard time :) chernobyl you really think is a good time to talk about it :)
@PythonSimplified2 жыл бұрын
Yeyy! Super happy you found it useful! 😁 Everybody talks so much about Ukraine in recent days - feels like if I don't include it in a video - nobody is going to watch it 🙃 It's actually one of those dates that you remember for years (specially the time!! 01:23:4 is absolutely insane!!) I've done a report on Chernobyl when I was in 12th grade and it's still in my memory since then! 🤪 The other memorable date I had in mind was September 1st 1939... but it might not be the best time to talk about WW2 either 😅😅
@MrGraumich2 жыл бұрын
Hello. Unfortunately my English is not very good. Come from Germany. But I would like to take this opportunity to compliment you on your very informative videos. And yes, I can understand most of it. Thanks for so much Python input.
@manudewi Жыл бұрын
9:04 - 9:09: For people who like it precise. An if condition helps out :)
@danamilcin22932 жыл бұрын
Thank you very much for this excellent video! I was searching for the solution of my problem and I found the clues here. My point was to print out the current date and time only with hour, minutes and seconds. And I did it like this: now = datetime.now() current_time = now.strftime("On %A, %d of %B, %Y at %X") print(current_time) -> On Tuesday, 24 of May, 2022 at 18:54:20 You are awesome!!
@BijouBakson10 ай бұрын
The subject of time seems so trivial because we are supposed to be familiar with it; after all, we all use time daily, right? This explains why when dealing with a subject that involves time, the coding complication it brings seems a little too much to do for "something so simple". But the truth is, it is a pretty complex subject. If you don't spend the time to study it, it will always be a problem. Thank you very much for taking time to put this together.
@dironin23632 жыл бұрын
Thank you! Very useful! ❤
@PythonSimplified2 жыл бұрын
Thank you so much! I'm super happy to help! 😊
@sherryab3964 Жыл бұрын
Wow! So glad I found your channel! This is super helpful!
@PythonSimplified Жыл бұрын
Thank you so much Sherry! Super happy to help!! 😊😊😊
@cybersecurityexpert4772 жыл бұрын
please 🥺 complete python tutorial for absolute beginners 🥰your talking way is easy and understandable one part please 🥺
@pouyafarid81912 жыл бұрын
I think if you make a playlist, it will be amazing to solve the questions of the Rank Hacker site
@PythonSimplified2 жыл бұрын
Hi Pouya! 😀 I generally try to stay away from things that include the word "hacker" in them 😅 I'm already known for my bot-making tutorials (which probably ended up terrorizing some of my cyber security collogues, and actually some of the techniques I've shared ended up being used against me by Instagram imposters and DoS folks hahahaha 🤣🤣🤣 which is ironic... but totally deserved!! I can't really complain about it 🤪) So even if I get involved only in simple white-hat stuff and share it on this channel, eventually it will be used against me! But I wish I could! it's a super interesting topic! 😊 By the way, the name of one of my best friends in Canada is also Pooya! (he just spells it a bit differently 😉)
@pouyafarid81912 жыл бұрын
hi 🖐🏻 thankyou for reply I think making videos about solving Python questions can be useful for programmers. You are right about my name, both modes of writing are correct.⚘⚘
@jongcheulkim72842 жыл бұрын
Happy birthday^^ Thank you so much for lots of great videos!!
@PythonSimplified2 жыл бұрын
Thank you so much Jong!!! 😁😁😁
@rohanchess8332 Жыл бұрын
Clean and fast code, I love it. Belated happy birthday too XD
@fnuker40022 жыл бұрын
Happy birthday :* thanks for tutorials ;)
@PythonSimplified2 жыл бұрын
Thank you so much fnuker!! 😊😊😊
@diwakar_tsn2 жыл бұрын
I'm first🔥❤️🇳🇵
@mehdismaeili37436 ай бұрын
Excellent. Great as always.
@Steven-ki9sk2 жыл бұрын
Very good presentation. Thanks
@patdevai89162 жыл бұрын
C est fantastic.
@PythonSimplified2 жыл бұрын
Merci beaucoup, mon ami! 😀
@user-qi8mb2ij5o Жыл бұрын
one of the bests, thanks and I have a question, what if we want to prompt the user for time or date? I really have a tough time struggling with the errors. :(
@juliuswanyama Жыл бұрын
I am binging on these tutorials😊
@_isDev Жыл бұрын
awesome! could you make a video talking about time series? thanks!
@verdirossi212 жыл бұрын
Thanks!
@PythonSimplified2 жыл бұрын
You're absolutely welcome! have fun! 😀
@sibymohamed3013 Жыл бұрын
thanks A LOT TEACHER GOS BLESS YOU Awesonne from SENEGAL
@theRealtensigh2 жыл бұрын
Very cool tutorial, I like how you're concise and to the point.
@jerrywang32252 жыл бұрын
I had difficulty converting integer timestamp into readable time, I finally used pandas to do the conversion for me.
@--AnonymousUser--2 жыл бұрын
8:05: and beeauuuutiful 😄❤❤❤
@Babu-so4sj2 жыл бұрын
Ur soo active and genius
@satpravin2 жыл бұрын
Write a python function to get well formatted date. Input date format to the function is "DD/MM/YYYY" and the output format must be "DD Month YYYY". Eg. If "15/05/1995" is the input to the function then it must return "15 May 1995" string. You must use following MONTH list in your code. MONTH = [None, 'Jan', 'Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'] Test Cases (INPUT=>OUTPUT) 1. '01/01/2001' => '01 Jan 2001' 2. '20/5/2010' => '20 May 2010' 3. '9/9/2021' => '9 Sep 2021'
@M.I.S2 жыл бұрын
please teach more OOP (abstract ) and database(no sql and mongodb) for python.
@PythonSimplified2 жыл бұрын
Thank you so much for requesting Davood! 😀 I'll film something about abstract OOP classes soon, while MongoDB will take a bit of time but it's definitely on my list 😉
@anorprogrammer2 жыл бұрын
Maria can you do the next lesson about apscheduler?
@PythonSimplified2 жыл бұрын
Hi Shahobiddin! 😀 I just checked out their documentation and I believe there's a better solution for this... are you looking to schedule certain events in your app? like a calendar that sends you reminders? or did you have another functionality in mind? 😁
@arijanrahimic32102 жыл бұрын
Great content🤓 THX
@PythonSimplified2 жыл бұрын
Yeeeey!! Thank you so much, I'm glad you liked it! 😁
@arijanrahimic32102 жыл бұрын
I like it because you are going on persistent 😎 also you mentioned Nicola Tesla, I liked that very much. Did you know his birthday without looking🤓?
@PythonSimplified2 жыл бұрын
hahaha nope! I must admit that I've googled this one! 😉 However the Chernobyl disaster date - I remember it since 12th grade! I've done a report on it for English class and it's in my brain ever since... God knows why 🤷♀️ hahaha
@rashidhajiyev20892 жыл бұрын
Great video
@PythonSimplified2 жыл бұрын
Thank you so much Rashid! 😁
@marcelocostati2 жыл бұрын
Very helpful! Great video! Thanks
@PythonSimplified2 жыл бұрын
Thank you so much Marcelo! I'm glad you liked it! 😊
@hemanthreddy73352 жыл бұрын
Can u do a tutorial on kivy date picker Widget and also an example project on that? I'm currently working on an activity that takes date input from user and wait for that particular time (then do some task like: reminder, showing a toast message etc.). I've used DatepickerDialog in Android studio, but I wanna know how it could be implemented in kivy
@PythonSimplified2 жыл бұрын
Thank you so much for suggesting! 😀 I'll definitely look into it! I have a few upcoming GUI projects (Pygame, DearPyGUI redo and Tkinter redo), I might be able to cover another Kivy app as well! 😉 BTW KivyMD has some really nice date and time pickers: kivymd.readthedocs.io/en/0.104.1/components/pickers/index.html You might like them more than their Kivy equivalents... I actually always prefer KivyMD, especially when it comes to mobile apps! 😊
@_mrmark Жыл бұрын
Maria, you are great! 👍
@Alphabet_-_2 жыл бұрын
Thumbs UP☝👍👍
@PythonSimplified2 жыл бұрын
Thank you so much Alphabet! 😀 Where did you get the third thumb?? 🤪 hahahahaha
@elibusz10 ай бұрын
Doesn't the time difference come from the implementation needing to call the function twice for each instance? Because you're essentially calling the function 2^(idx-1) times for the Fibonacci problem, as opposed to what happens with the loop on the first problem
@MS-qk5cz Жыл бұрын
very helpful video, thanks for your help
@joelsstuff83182 жыл бұрын
Thanks for all your videos. Very well done. You have a very cute accent and I hate to mess with it, but I feel like I should maybe helpfully point out that when we use the verb “attribute” in English, it rhymes with “contribute” and “tribute”, just like you say it. But when we use the noun “attribute” I almost always hear the emphasis on the “at”. So “ATtribute”. Crazy, maybe. Or maybe to help distinguish the noun from the verb. Who knows. Not sure if you want to reduce your accent or not. It is a cute accent. Anyway. Thanks for the vids.
@PythonSimplified2 жыл бұрын
Thank you so much Joel! 😀 Are you sure it's not a British pronunciation? I'm yet to hear “ATtribute” here in North America, but my British lecturers from UoL use it all the time! 😊 Also, I don't know if accent is something you choose to have... 😅 or else you're an actor or something! hahaha It's just how your mouth reacts when your brain commands it to things, if you could control it - we'd all speak like Morgan Freeman! 🤣🤣🤣
@PythonSimplified2 жыл бұрын
@Oversight so noun versus verb kind of situation, eh? KK guys, I'll try it the other way around next time I say attribute! 😉
@Brentfindley Жыл бұрын
great tutorial, you earned a sub!
@benedictehon82966 ай бұрын
Please can u recommend a book to study for basic python
@morijin69032 жыл бұрын
7:53 isn't Sunday represented as a 0?
@mas-daym7 ай бұрын
Idk why, I did import date But it cannot be read, it keeps showing traceback
@MrPioneer72 жыл бұрын
Thank you, very informative and helpful
@65senshi Жыл бұрын
How can you work out the age of a person from their original birthdate to the current date now? So for example, 33 years, 54 days old.....
@Yachid2 жыл бұрын
Good Morn'ng!
@PythonSimplified2 жыл бұрын
Good Morning! 😀
@engr.malikiftikharahmad87519 ай бұрын
Excellent.
@rohitgupta77582 жыл бұрын
Please make video on tensorflow directml
@partymaschine922 жыл бұрын
Really Nice!! How would you accomplish the task of rounding time to the next 15mins?
@trtlphnx2 жыл бұрын
Love Your Presentations: YOu Are Incredible, Thanks Sweetie ~
@PythonSimplified2 жыл бұрын
Thank you so much trtlphnx! 😀😀😀
@MrRobot2222 жыл бұрын
Typical programmer, still working at the 43rd minute of the second hour of the day! 😂
@PythonSimplified2 жыл бұрын
hahahahaha don't forget the 000th microsecond 🤣🤣🤣
@levent212 жыл бұрын
14:44 I was muttering the same date just before you said it while watching "2022, 5, 2..." how could this be? :) Anyway, thanks for this great video, very useful.
@PythonSimplified2 жыл бұрын
hahahaha great minds think alike? 😉 Thank you so much for your comment! 😊
@levent212 жыл бұрын
@@PythonSimplified I think so 🙂
@NawtieBoy962 жыл бұрын
can you also make a video on how to implement timer in py . If you know any source then pls share it as my project requires a timer logic where I start timer of 10mins and if time is elapsed , I call a function but if not then I reset timer . any idea how can this be implemented? thanks a bunch for making python tutorials like these :D
@Kennethlumor2 жыл бұрын
Madam please and please help me. I developed E-learning management systems where I want the admin sqlite3 database (user_loader(UserMixin) should be different from the students own how do I go about it. Sir please help 😢 because the project is my final year project that I will be submitting ending of this month
@Code-Shake-code9 ай бұрын
Happy late Birthday! 😁
@hamoudimaghoul34072 жыл бұрын
Thank you @Mariya - the best - (\/)
@PythonSimplified2 жыл бұрын
Thank you so much Hamoudi! 😁
@wagnerjosegertrudesmuitoal36382 жыл бұрын
great video as a beginner I learned a lot today, but it's hard to concentrate on the code, she is very beautiful.
@PythonSimplified2 жыл бұрын
Thank you so much for the lovely comment Wagner Jose!! 😀😀😀 I'm super happy you found this tutorial helpful and I hope you'll be able to concentrate better on the upcoming videos! 😜 (I'm trying to decrease makeup levels from one video to another hahaha)
@wagnerjosegertrudesmuitoal36382 жыл бұрын
@@PythonSimplified Don't do this please I promise I will focus on the code !
@PythonSimplified2 жыл бұрын
hahahahaha ok you convinced me!🤣🤣🤣
@cybersecurityexpert4772 жыл бұрын
can we do python programming and app development in mobile ☹️I don't have laptop
@DJ-ej9jj Жыл бұрын
Happy Belated Birthday :)
@martinb.89122 жыл бұрын
Great videos keep it up! :)
@FufaTujuba2 жыл бұрын
do on async/await or asyncio .... please!
@amrogendiah1982 жыл бұрын
Can you make a tutorial on how to use python to scrape mobile applications?
@PythonSimplified2 жыл бұрын
Usually mobile applications have a desktop equivalent and they're really easy to target! 😊 For example - instead of accessing Instagram through the phone, navigate to instagram.com on your computer and then you can scrape it with no problem with Selenium! Same goes for other social media platforms like Facebook, LinkedIn, Twitter, etc. I have a bunch of tutorials with Selenium scraping social media, it's the go-to tool when you don't want to be detected as a bot! 😉 ⭐ web scraping entire Facebook image gallery with Selenium: kzbin.info/www/bejne/iaS7lKylmtuejJI ⭐ web scraping Instagram images with Selenium: kzbin.info/www/bejne/n3uqp4x4fZ6gmbs ⭐ automating LinkedIn contacts using Selenium: kzbin.info/www/bejne/bZKsk2mfhr-eetk In terms of scraping the actual mobile app - you may run into issues as you won't be dealing with DOM elements (which you see in web applications) but you'll be dealing with GUI widgets which are much more complex to target if you're not familiar with the source code. You can easily find the source code of web applications through the "developer tools", but in terms of mobile apps - it's a completely different ball game! 🙃
@amrogendiah1982 жыл бұрын
@@PythonSimplified thanks
@ezzeldin1012 жыл бұрын
awesome!
@BJCP2 жыл бұрын
Hey Hey, Just a question about the use of {} placeholders rather than using print(f"it's the {now.minute}th minute of the {now.hour}......") Is there a reason why you use place holders rather than putting the variable directly in the curly braces?
@BJCP2 жыл бұрын
I should have read the comments....
@relytheone8537 ай бұрын
I would build a keylogger with dates.
@--AnonymousUser--2 жыл бұрын
"Round brackets" => parentheses
@bahodirsiddiqov3071 Жыл бұрын
respect☺☺
@matthewprestine19742 жыл бұрын
It a type of trivia, here's my b-date but what year was I born? My guess is 5/22/95 ;)
@PythonSimplified2 жыл бұрын
hahahaha you're quite close Matthew! 😀
@andreconnelly95792 жыл бұрын
Hello, you Can you help my idea of "date" put into to database of SQLite. Eg likes Birthday or Date of Birth. My idea is can you do "Qt designer" is "QtDateEdit" of the object is "dateEdit" I am trying to work out the python programming for input into the database. You to you.
@PythonSimplified2 жыл бұрын
Hi Andre 😀 SQL actually has a special data type for dates and you can insert and select them from a table quite conveniently. You can find more info in this W3 Schools tutorial: www.w3schools.com/sql/sql_dates.asp I'll be covering SQL in much more detail in an upcoming tutorial, but I don't want you to wait for so long! 😉 Good luck with your project and I hope it helps! 😊
@wisdom38512 жыл бұрын
❤❤
@scarsthefirst2 жыл бұрын
Who will help me with my timezone assignment, new to python.
@gobyg-major20572 жыл бұрын
5:42 365* not 356…also 3 zeros after seconds actually means milliseconds…u need 6 zeros for microseconds…..
@shinrafahell2 жыл бұрын
Python is beautiful like you!
@PythonSimplified2 жыл бұрын
Thank you so much Rafael! 😊
@serge20332 жыл бұрын
my_date = date(2022, 5, 24) 😁
@PythonSimplified2 жыл бұрын
Nice!! we're 2 days apart!! 😀
@cybersecurityexpert4772 жыл бұрын
please kivy tutorial
@AcademiaCS1 Жыл бұрын
And that voice!!
@amandakleisnerova7473 Жыл бұрын
The Chernobyl disaster occured on ...... New York time, Tokio time, Paris time?
@mayedalshamsi2 жыл бұрын
5:40 xD
@cybersecurityexpert4772 жыл бұрын
my question you are hacker programmer or developer ? 🙂
@PythonSimplified2 жыл бұрын
Most certainly not a hacker! programmer and developer for sure :) But no shady stuff on my end!!! Well... that if we don't count bots as shady XDDDD
@cybersecurityexpert4772 жыл бұрын
@@PythonSimplified can we create app python programming in mobile??
@cybersecurityexpert4772 жыл бұрын
@@PythonSimplified I am Soo much 🥰😍 happy that I got reply response one request for kivy tutorial how long video no matter but full from beginning to advance please I will watch I want to watch
@jeffegg211 ай бұрын
😍
@Babu-so4sj2 жыл бұрын
Hi
@howardalien272010 ай бұрын
I thought you were gonna use 9/11 for the not so happy date lmao