/ Published in: Python
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
 # Given some text with newlines: text = "hello\nworld\n!!!" # Add a tab before every newline: "\t" + text.replace("\n", "\n\t")
Comments
                    Subscribe to comments
                
                