Python issue with printing out strings

I am following a tutorial using sublime text that uses python and the tutorial had me define 2 functions into strings but they want be printed out together can anyone help me please? Im sorry for asking such a basic question but im very new to this and this is one of my bigger projects im doing first.

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>def joinchat():
Loading = True
while Loading:
readbuffer_join = irc.recv(1024)
readbuffer_join = readbuffer_join.decode()
for line in readbuffer_join.split("n")[0:-1]:
print(line)
Loading = loadingComplete(line)
def loadingComplete(line):
if ("End of /NAMES list" in line):
print("Bot has joined " + CHANNEL + " Channel")
sendMessage(irc, "yo")
return False
else:
return True
def sendMessage(irc, message):
messageTemp = "PRIVMSG #" + CHANNEL + " " + message
irc.send((messageTemp + "n").encode())
def getUser(line):
separate = line.split(":", 2)
user = separate[1].split("!" , 1)[0]
return user
def getMessage(line):
try:
message = (line.split(":",2))[2]
except:
message = ""
return message
def console(line):
if "PRIVMSG" in line:
return False
else:
return True
joinchat()
while True:
try:
readbuffer = irc.recv(1024).decode()
except:
readbuffer = ""
for line in readbuffer.split("rn"):
if line == "":
continue
else:
print(line)
user = getUser(line)
message = getMessage(line)
print(getUser(line) + getMessage(line))
if "PING" in line and Console(line):
msgg = "PONG tmi.twitch.tvrn".encode()
irc.send(msgg)
print(msgg)
continue
</code>
<code>def joinchat(): Loading = True while Loading: readbuffer_join = irc.recv(1024) readbuffer_join = readbuffer_join.decode() for line in readbuffer_join.split("n")[0:-1]: print(line) Loading = loadingComplete(line) def loadingComplete(line): if ("End of /NAMES list" in line): print("Bot has joined " + CHANNEL + " Channel") sendMessage(irc, "yo") return False else: return True def sendMessage(irc, message): messageTemp = "PRIVMSG #" + CHANNEL + " " + message irc.send((messageTemp + "n").encode()) def getUser(line): separate = line.split(":", 2) user = separate[1].split("!" , 1)[0] return user def getMessage(line): try: message = (line.split(":",2))[2] except: message = "" return message def console(line): if "PRIVMSG" in line: return False else: return True joinchat() while True: try: readbuffer = irc.recv(1024).decode() except: readbuffer = "" for line in readbuffer.split("rn"): if line == "": continue else: print(line) user = getUser(line) message = getMessage(line) print(getUser(line) + getMessage(line)) if "PING" in line and Console(line): msgg = "PONG tmi.twitch.tvrn".encode() irc.send(msgg) print(msgg) continue </code>
def joinchat():
        Loading = True
        while Loading:
            readbuffer_join = irc.recv(1024)
            readbuffer_join = readbuffer_join.decode()
            for line in readbuffer_join.split("n")[0:-1]:
                print(line)
                Loading = loadingComplete(line)
def loadingComplete(line):
        if ("End of /NAMES list" in line):
            print("Bot has joined " + CHANNEL + " Channel")
            sendMessage(irc, "yo")
            return False
        else:
                return True
def sendMessage(irc, message): 
    messageTemp = "PRIVMSG #" + CHANNEL  + " "  + message
    irc.send((messageTemp + "n").encode())
def getUser(line):
    separate = line.split(":", 2)
    user = separate[1].split("!" , 1)[0]
    return user 
def getMessage(line):
    try:
        message = (line.split(":",2))[2]
    except:
        message = ""
        return message
def console(line):
    if "PRIVMSG" in line:
        return False
    else:
        return True

joinchat()

while  True:
        try:
            readbuffer = irc.recv(1024).decode()
        except:
            readbuffer = ""
        for line in readbuffer.split("rn"):
            if line == "":
                continue
            else:
                print(line)
                user = getUser(line)
                message = getMessage(line)
                print(getUser(line)  + getMessage(line))
            if "PING" in line and Console(line):
                msgg = "PONG tmi.twitch.tvrn".encode()
                irc.send(msgg)
                print(msgg)
                continue
                        

I thought this was something simple but I can’t figure out why this won’t work I remember doing this before but I can’t figure out why they can’t be used in the same line also I was following a tutorial that did the code like this and it worked without issues. any help is appreciated!

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật