style: modify the output of scripts
Instead of separating output primes by newline, the scripts now separate by spaces.
This commit is contained in:
parent
0e55a43863
commit
a3b53b180c
3 changed files with 8 additions and 4 deletions
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
|
||||
def sieve_of_eratosthenes(n):
|
||||
nums = list(range(2, n))
|
||||
while nums:
|
||||
|
|
@ -11,7 +10,8 @@ def main():
|
|||
num = int(input("Primes up to: "))
|
||||
print()
|
||||
for i in sieve_of_eratosthenes(num):
|
||||
print(i)
|
||||
print(i, end=" ")
|
||||
print()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue