1 2 3 4 5 6 7 8 9 10 11 |
def word_line_count(s): return(len(s.split()),len(s.splitlines())) my_list = "CSeries 275 MRJ 150" print(word_line_count(my_list)) #(4, 1) my_list = "CSeries 275\n MRJ 150" print(word_line_count(my_list)) #(4, 2) |
Recent Posts
- #455 Creating a Simple Table with Python
- #454 What Happens When Aluminum Is Exposed to Temperatures Above 400°F (204°C)?
- #453 What is Cooling Climb in Aircraft?
- #452 Save selected nodes coordinates to*.csv file in tcl for HyperMesh
- #451 Make the First Letter of Every Post Title Capital in WordPress using CSS
- #450 Comments Are Now Open – Share Your Thoughts!
- #449 Filled polygon with Koch snowflake in python
- #448 Torque Peaking Due to Viscus Damper Deadband
- #447 Command *loadsize in tcl for HyperMesh
- #446 Mechanical vibrations of a material point
Categories
- aerospace (4)
- aircraft (5)
- animation (14)
- aviation photos (1)
- awk (21)
- bash (15)
- batch (12)
- bioinformatics (2)
- buckling (4)
- C# (8)
- cluster (1)
- composites (4)
- differential equations (3)
- engineering (10)
- excel (2)
- fem (5)
- genetic algorithm (1)
- HyperMesh (49)
- HyperView (1)
- interpolation (1)
- iSight (1)
- Latex (2)
- linux (16)
- machine learning (3)
- math (9)
- matplotlib (35)
- mechanics (2)
- Monte Carlo (1)
- nastran (33)
- Nicholas Roerich (1)
- notepad++ (1)
- numerical (5)
- numpy (3)
- octave (1)
- optimization (17)
- OptiStruct (10)
- pandas (4)
- patran (3)
- perl (1)
- plot (25)
- powershell (1)
- pso (2)
- python (252)
- R (5)
- regexp (1)
- scipy (6)
- seaborn (15)
- sed (1)
- sklearn (1)
- strength of materials (7)
- tcl (87)
- tkinter (14)
- turtle (6)
- vba (3)
- vibration (5)
Archives
- December 2024 (3)
- November 2024 (4)
- October 2024 (1)
- September 2024 (2)
- August 2024 (2)
- July 2024 (11)
- June 2024 (3)
- May 2024 (10)
- April 2024 (2)
- February 2024 (5)
- January 2024 (14)
- December 2023 (2)
- November 2023 (3)
- September 2023 (4)
- August 2023 (18)
- July 2023 (17)
- June 2023 (6)
- May 2023 (4)
- April 2023 (1)
- March 2023 (2)
- February 2023 (1)
- January 2023 (12)
- December 2022 (7)
- November 2022 (11)
- October 2022 (9)
- September 2022 (6)
- August 2022 (6)
- June 2022 (6)
- May 2022 (4)
- April 2022 (5)
- March 2022 (4)
- February 2022 (7)
- January 2022 (35)
- December 2021 (5)
- November 2021 (40)
- October 2021 (7)
- September 2021 (5)
- August 2021 (1)
- June 2021 (3)
- May 2021 (2)
- March 2021 (1)
- February 2021 (11)
- January 2021 (10)
- December 2020 (2)
- November 2020 (12)
- October 2020 (2)
- September 2020 (33)
- August 2020 (5)
- July 2020 (2)
- June 2020 (6)
- May 2020 (19)
- April 2020 (1)
- March 2020 (2)
- February 2020 (2)
- January 2020 (1)
- October 2019 (1)
- August 2019 (2)
- July 2019 (2)
- March 2019 (3)
- February 2019 (10)
- January 2019 (42)
- December 2018 (23)
- December 2017 (1)
- December 2016 (3)
Recent Comments