alright guys what's going on welcome
back to another video and I go ahead and
close these um so in today's video it's
gonna be another quick little tip or
trick or something I found delving into
Python so I'm back from the holidays and
I thought I would start you know making
videos regularly again that's what I
plan on doing at least so if you like
this kind of content be sure to you know
like and subscribe I appreciate it
anyway today we're gonna go over a trick
and tip and Python that you might not
have known and I came across it because
I was doing a problem on hacker rank
which if you don't know it is a free
site that you can sign up and do some
practice problems you know and different
programming languages it's a good way to
learn stuff that's a good way to also
see how well you know stuff you know it
goes from the basics to more expert
questions more advanced questions and
like I said it's free to sign up it's
just hacker ENCOM and you can go ahead
and try that if you like but anyway I
had a Python problem I'm just going
through Python questions and I had a
problem where it printed out things like
like kind of like this so it would be
like 1 2 3 4 5 right
and the only thing I knew was print and
then if I print something like if I
print one and then if I printed 2 and so
on and so forth right so it's I ain't
called VIP I cut anyway if we change
this to 3 and we go ahead and run this
you'll see there's a new line and this
is default all right to have a new line
after each print statement and I wasn't
sure how to go about printing without a
new line and I figured it out and I
thought I'd share it with you guys in
case you know you ever come into this
problem and one - no I can't believe I
never really ran into this problem
before but I'm glad I did because it's
very useful so what you want to do the
print actually can accept two different
kind of parameter
so if we do print one actually let's
just go back to what we had we can do a
comma after what we want to print and
then we use the keyword end equals and
then whatever we want so by default it
would be n slash and it'd be backslash n
which is a new line and then if I wanted
it to not be a newline I wanted it to
just be nothing maybe a space I would
just do a space alright so I have two
single quotations and then space so this
is after we print two it's going to end
that print with a space and let's say
this we want to end with an exclamation
point for some reason let's go ahead and
run that and you'll see what happens so
we have one and you can see it's it goes
to a new line because we did the
backslash n which is the new line and
then we printed two on this new line and
we ended it with just a space so now
there's a space and then we printed
three and we ended it with this
exclamation point so if we wanted to
link them together and not do new lines
kind of like this we can go ahead and
run that and you can see now it's one
two and three maybe you don't want this
at the very end maybe you just want a
smiley face or something a space and
then a smiley face I don't know
something like that there you go so you
can use the N key word and equals and
then some kind of of string or character
to go ahead and end it with and if you
didn't want anything alright if we
didn't want we didn't want a character
if we didn't want a space or anything we
just wanted the very next thing we would
do something like this it would just do
two single quotes and nothing in between
them just completely uh completely blank
no space or anything so we at run now it
prints one two three no spaces in
between so I didn't know how to do that
before and now I do and
hopefully you guys can find this useful
as well I'm sure I'll come up if you're
working with Python in one way or
another and it's never something I saw
in a tutorial like a beginning tutorial
before until now so I thought go ahead
and make a video on it
hope you guys find this useful like I
said I'm gonna continue making different
tricks and tips I find along the way as
I practice and whatnot and you guys can
hopefully benefit from that as well so I
will see you guys in the next video
thanks for watching and don't forget to
subscribe if you like this kind of stuff
I'll see you later