Skip to main content

Best Python Cheatsheet

Python là một trong những ngôn ngữ lập trình tốt nhất để học. Khi bạn bắt đầu, bảng tham chiếu một trang về các biến, phương pháp, và các tùy chọn định dạng có thể có khá tiện dụng.

 Mong bạn thấy bài viết hữu ích !

Chúc bạn thành công !

Comments

Popular posts from this blog

Testing React Native Apps

What are we unit testing exactly ? We're using  "unit testing"  to refer to tests of functions and plain JavaScript objects, independent of the React Native framework. This means that we aren't testing any components that rely on React Native. For example, a unit could be individual methods and functions in classes or really any small pieces of functionality. We mock out dependencies in these tests so that we can test individual methods and functions in isolation. These test are written using testing frameworks and for this article i will be using  Jest , javascript testing framework together with  Enzyme  and  React Native Testing Library . Setting Install If you use  React Native CLI  installs the  Jest  testing framework by default. But if you're using Expo we need to install it manually. yarn add -D enzyme enzyme-adapter-react-16 More: yarn add react-dom react-native-testing-library Create new file  je...

Python cheatsheet for beginner

View on Github Recommended Tutorials Learn Python | CodeAcademy Progate Python Classes Video Tutorial for absolute beginners | YouTube Intro to Python | Udacity Python For Everybody Write Better Python Functions Learning Python: From Zero to Hero Automate the Boring Stuff with Python  - Recommended The New Boston Python | Youtube Think Python 2e - Green Tea Press A Byte of Python Project Euler A Whirlwind Tour of Python Python Data Science Handbook Python Class By Google  - Recommended Intro to Python for Data Science Python 3 for humans that want practical project exposure Learn Python the Hard Way Django - Python Try Django | YouTube Django Docs Django Girls MDN Web Docs SimpleIsBetterThanComplex Blog Tango With Django Book Django Class-Based Views The Algorithms Python Flask - Python The Flask Mega Tutorial Writing shorthand statements in python Python is having shorthand statements and shorthand operators. These thin...

ES6 Arrow Function Cheatsheet

Dưới đây là một số cách để bạn có thể viết arrow functions trong ES6 . // Explicit Return, Multi-Line a => { return a } // Explicit Return, Single-Line a => { return a } // Implicit Return, Multi-line a => ( a ) // Implicit Return, Single-Line a => a // Multiple Parameters, Parentheses Required (a, b) => a, b Implicit vs Explicit Return Mỗi chúng ta có một cách viết arrow functions khác nhau. Với normal functions , nếu bạn muốn return 1 cái gì đó, bạn sẽ dùng từ khóa return . Arrow functions cũng như vậy. Khi bạn dùng từ khóa return , nó sẽ gọi là ` explicit return `. Hãy thử coi các ví dụ sau: Có thể nhận rõ ràng sự khác biệt. Khi nào thì dùng dấu ngoặc nhọn` {} `, bạn cần phải chính xác cái mà return ra. Tuy nhiên, nếu không dùng ` {} `, return sẽ là bao hàm, và bạn không cần chúng. Có một cách gọi tên cho việc đó. Khi bạn sử dụng dấu ngoặc nhọn như ở Example B thì nó gọi là ` block body `, và cú pháp ở Example C gọi là ` concise body `....