Ask coding questions

← Back to all posts
how to convert java to python
jovrobin

import java.util.Scanner;
import java.util.Stack;

public class FruitBasket {
public static void main(String[] args) {
int numFruits;
String a="Apple", o="Orange", m="Mango", g="Guava";
Scanner sc= new Scanner(System.in);
Stack basket = new Stack();

}

Voters
jovrobin
Comments
hotnewtop
CodingElf66

Just check out CodingIsCool, its just a good project where you can code in Java, using Python code.

Hope you can mark this as answered lol, jk.

RoBlockHead

Java and Python are inherently different programming languages. With most programming languages, there's no way to just convert from one to another, you have to manually reprogram the program in the other language.

Highwayman

What do you mean? You learn python, and then reimplement the program in python.