About 29,800,000 results
Open links in new tab
  1. string - Print a horizontal line in python - Stack Overflow

    Jan 4, 2021 · If you would like to print a horizontal line across the terminal the width of the terminal, you can use: import os term_size = os.get_terminal_size() print('=' * term_size.columns)

  2. How to Print in the Same Line in Python [6 Methods] - Python

    Jan 29, 2024 · Learn six different methods to print on the same line in Python using print(), sys.stdout, loops, and more. Step-by-step guide with examples for better output!

  3. How to Print a Horizontal Line in Python | bobbyhadz

    Apr 9, 2024 · To print a horizontal line, use the multiplication operator to repeat a hyphen N times. Use the `print ()` function to print the horizontal line.

  4. Plot a Horizontal line in Matplotlib - GeeksforGeeks

    Apr 2, 2025 · In Matplotlib, we can draw horizontal lines on a plot to indicate thresholds, reference points or important levels in the data. These lines can be used to highlight specific values for …

  5. Plot a Straight Line (y=mx+c) in Python/Matplotlib - ScriptVerse

    The equation $y=mx+c$ represents a straight line graphically, where $m$ is its slope/gradient and $c$ its intercept. In this tutorial, you will learn how to plot $y=mx+b$ in Python with Matplotlib.

  6. Matplotlib Examples: Drawing Straight Lines - queirozf.com

    May 6, 2022 · Examples showing you how to draw several types of straight lines on matplotlib, horizontal, vertical, at angles, dashed, solid, etc

  7. (Python) How to print something in a straight line

    Jan 23, 2021 · It might be easiest, not to print the triangle's characters directly. Instead, I would buffer them in a list and print the resulting lines in the end. I initialize the output buffer with text …

  8. How to Plot Horizontal Line in Python - Delft Stack

    Feb 2, 2024 · We will introduce how to create a horizontal line in Python. We will also introduce the Matplotlib library in Python. A horizontal line is any straight line that drives from left to right …

  9. How to Print without newline in Python? - GeeksforGeeks

    Apr 26, 2025 · In Python, you can use the asterisk (*) operator to unpack a list or tuple and print its elements without adding a newline between them. Explanation: The * operator unpacks the …

  10. Matplotlib | Plot infinitely long lines or bars (hlines, vlines ...

    Aug 3, 2023 · Python’s Matplotlib makes it easy to plot horizontal and vertical lines with just a few lines of code! This article details how to use Matplotlib’s hlines, vlines, axhline, axvline, axline, …

  11. Some results have been removed
Refresh