In Python, you can use the `print` function with the `end` parameter set to an empty
string (`""`) or a specific character (e.g., `","`) to prevent printing a newline after
each call. Here are some ways to achieve this:
**Method 1: Using `end` parameter**
python
print("Hello", end="")
This will print "Hello" without printing a newline.
**Method 2: Setting `sys.stdout.write`**
python
import sys
sys.stdout.write("Hello")
This will write "Hello" to the standard output without printing a newline.
**Method 3: Using a loop with `print()` calls**
python
s = "Hello"
for c in s:
print(c, end="")
This will print each character of the string "Hello" on the same line.
**Method 4: Using a generator expression with `print()`**
python
s = "Hello"
print(*s, sep="", end="")
This is similar to Method 3, but uses the `*` operator to unpack the string into
individual arguments for the `print()` function.
Note that in all cases, if you want to print a newline at the end of your output, you can
add another call to `print()` with no arguments or an empty string (`""`) as its argument.