[0:00] async await oh no is this going [0:03] somewhere off of python well it's not we [0:06] can use async AWA in Python too let's [0:08] see how consider this function the task [0:12] is an asynchronous function because it's [0:14] marked with the async keyword in Python [0:17] when we Mark a function with the async [0:19] it becomes a [0:20] coroutine coroutines can be paused and [0:23] resumed allowing other tasks to run in [0:25] the meantime to use Ayn we in Python we [0:29] need to use the async IO [0:31] Library so what's the need to write [0:34] asynchronous functions in Python by [0:36] using async in a wait we can write [0:39] non-blocking code that performs tasks [0:41] concurrently resulting in faster and [0:43] more responsive programs here we have [0:46] two scenarios on the left we have a [0:48] synchronous function and on the right we [0:51] have an asynchronous function both [0:53] functions do the same thing and we are [0:55] checking who's going to take less time [0:57] to complete over 10 laps here's the [1:00] output and it clearly shows that the [1:01] asynchronous function won by a big [1:03] margin that was fast asynchronous [1:06] functions don't wait for one task to [1:08] complete they go all in executing tasks [1:11] concurrently let's see another one here [1:13] we have two functions load underscore [1:16] data and task the load underscore data [1:19] function simulates loading heavy data [1:21] while the task function simulates a [1:23] normal task the main function executes [1:26] both functions in sequence concurrently [1:28] upon running the code this output is [1:30] generated this shows that while the [1:32] program begins loading the data another [1:34] task gets executed in the meantime and [1:36] the program exits once the data is [1:38] completely loaded to recap async and [1:41] await are essential tools for [1:43] asynchronous programming in Python by [1:46] marking functions as async and using the [1:48] await keyword we can write non-blocking [1:50] code that performs tasks concurrently [1:53] resulting in faster and more responsive [1:55] programs thanks for watching don't [1:58] forget to like share and subscribe for [2:00] more python tutorials